import request from '@/utils/request'

export default {

    //生成统计数据
    createStatistics(day) {
        return request({
            url: `/statistics/statistic/statisticCount/${day}`,
            method: 'post'
        })
    },
    //获取图表数据 以显示图表
    getChartData(statisticObj) {
        return request({
            url: `/statistics/statistic/getChartData/${statisticObj.type}/${statisticObj.begin}/${statisticObj.end}`,
            method: 'get'
        })
    },
    //获取视频播放排行数据
    getVideoViewData() {
        return request({
            url: `/videoPromotion/video/getTopTenVideo`,
            method: 'get'
        })
    },
    //通过类型获取视频播放排行数据
    getVideoLikeDataByType(type) {
        return request({
            url: `/videoPromotion/video/getTopTenVideoLike/${type}`,
            method: 'get'
        })
    },
    //获取视频点赞排行数据
    getVideoLikeData() {
        return request({
            url: `/videoPromotion/video/getTopTenVideoLike`,
            method: 'get'
        })
    },
    //通过类型获取视频播放排行数据
    getVideoViewDataByType(type) {
        return request({
            url: `/videoPromotion/video/getTopTenVideoView/${type}`,
            method: 'get'
        })
    },
}